import request from "@/utils/request";
import { getParamsSuffix } from "@/utils/paramsUtils";


/**
 * 分页
 * @param params
 * @returns {Promise<any>}
 */
export async function selList(params) {
    return request('/api/cdcerservice/v1/followupList/selList', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}

/**
 * 修改保存
 * @param params
 * @returns {Promise<any>}
 */
export async function edit(params) {
    return request('/api/cdcerservice/v1/followupList/edit', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}


/**
 * 详情
 * @param query
 * @returns {Promise<any>}
 */
export async function selById(query) {
    const params = getParamsSuffix(query);
    return request(`/api/cdcerservice/v1/followupList/selById?${params}`);
}


/**
 * 存入正式库
 * @param params
 * @returns {Promise<any>}
 */
export async function add(params) {
    return request('/api/cdcerservice/v1/followupListOffice/add', {
        method: 'POST',
        requestType: 'form',
        data: { ...params },
    });
}

/**
 * 点击导出所有信息
 * @returns {Promise<any>}
 * @param params
 */
export async function queryAllExportData(params) {
    return request(`/api/cdcerservice/v1/followupList/queryAllExportData`, {
        method: 'POST',
        requestType: 'form',
        responseType: 'blob',
        data: {
            ...params
        }
    });
}



